//
//  MYNewsHotelSearchVC.m
//  MuYing
//
//  Created by tbb on 2019/8/6.
//  Copyright © 2019 TBB. All rights reserved.
//

#import "MYNewsHotelSearchVC.h"
#import "MYNewsDetailsHotelVC.h"
#import "MYNewsModel.h"
@interface MYNewsHotelSearchVC ()

@end

@implementation MYNewsHotelSearchVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
}
-(void)setupView {
    [super setupView];

}

- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
    MYNewsGoodsCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MYNewsGoodsCell"];
    MYNewsModel *newsModel = nil;
    if (indexPath.row < self.dataArr.count) {
        newsModel = self.dataArr[indexPath.row];
    }

    cell.newsModel = newsModel;
    return cell;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    MYNewsModel *newsModel = nil;
    if (indexPath.row < self.dataArr.count) {
        newsModel = self.dataArr[indexPath.row];
    }
    MYNewsDetailsHotelVC *detailsHotelVC = [[MYNewsDetailsHotelVC alloc] init];
    detailsHotelVC.informationId = newsModel.Id;
    detailsHotelVC.informationCategoryId = self.categoryId;
    kYQPUSH(detailsHotelVC);
}

@end
